import request from '@/utils/request'

export default {
    addCourseInfo(courseInfoVo) {
        return request({
          url: `/eduservice/course/addCourseInfo`,
          method: 'post',
          data : courseInfoVo
        })
    },

    //获取讲师列表
    findAll() {
      return request({
        url: `/eduservice/teacher/findAll`,
        method: 'get',
      })
  },

    //根据course_id获取信息
    getCourseInfo(courseId) {
      return request({
        url: `/eduservice/course/getCourseInfo/${courseId}`,
        method: 'get',
      })
    },

    //修改课程信息
    updateCourseInfo(courseInfoVo) {
      return request({
        url: `/eduservice/course/updateCourseInfo`,
        method: 'post',
        data : courseInfoVo
      })
    },

    //课程确认信息显示
    getPublihCourseInfo(id) {
      return request({
          url: '/eduservice/course/getPublishCourseInfo/'+id,
          method: 'get'
        })
  },

    publihCourse(courseId) {
      return request({
        url: '/eduservice/course/publishCourse/'+courseId,
        method: 'post'
      })
    },

    getCourseListPage(current, limit, courseQuery) {
      return request({
        url: `/eduservice/course/pageCourseCondition/${current}/${limit}`,
        method: 'post',
        data : courseQuery
      })
  },

    deleteCourse(courseId) {
      return request({
        url: `/eduservice/course/deleteCourse/${courseId}`,
        method: 'delete'
      })
    }
}